<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	  <script src="./Public/jquery-1.8.2.min.js"></script>
	    <script type="text/javascript">
    			$(function(){
    				$('#close_img').click(function(){
    					//显示上传表图片
    					$('#img_box').html('<input id="exampleInputEmail1" type="file" name="blogo">');
    				})
    			})
    		</script>
	</head>
	<body>
		<form action="" method="post">
				<div class="alert alert-success">添加品牌</div>
				<div class="form-group">
					<label for="exampleInputEmail1">品牌名称</label>
					<input id="exampleInputEmail1" class="form-control" type="text" required="" name="bname" value="<?php echo $oldData['bname']?>">
				</div>
				
				<div class="form-group">
					<label for="exampleInputEmail1">品牌logo</label>
					<div id="img_box">
					<!--如果有图片-->
					<?php if($oldData['blogo']){?>
                
						<img src="<?php echo $oldData['blogo']?>" style="width: 250px;height: auto;" id="img"/>
						<a href="javascript:;" id="close_img">×</a>
						<input type="hidden" name="thumb" value="<?php echo $oldData['blogo']?>"/>
					<?php }else{?>
						<!--没有图片显示上传表单-->
						<input id="exampleInputEmail1" type="file" name="blogo">
					
               <?php }?>
					</div>
				</div>
				<div class="form-group">
					<label for="exampleInputEmail1">排序</label>
					<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类排序" required="" name="bsort" value="<?php echo $oldData['bsort']?>">
				</div>
				<div class="form-group">
					<label for="exampleInputEmail1">是否热门</label>
					<input id="exampleInputEmail1" class="form-control"  type="checkbox" name="bhot" id=""  value="<?php echo $oldData['bhot']?>"/>
				</div>
				<input type="hidden" name="bid" value="<?php echo $_GET['bid']?>"/>
				<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
